import request from '@/utils/request'

export function getRegionList(params) {
  return request({
    url: '/api/vm-service/region/search',
    params
  })
}

export function getNodeList(params) {
  return request({
    url: '/api/vm-service/node/search',
    params
  })
}

export function addRegion(data) {
  return request({
    url: '/api/vm-service/region',
    method: 'post',
    data
  })
}

export function putRegion(data) {
  return request({
    url: `/api/vm-service/region/${data.id}`,
    method: 'put',
    data
  })
}

export function deleteRegion(id) {
  return request({
    url: `/api/vm-service/region/${id}`,
    method: 'delete'
  })
}

